home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Stubs
- Sent: 7/8/96 3:10 PM
- Received: 7/8/96 3:11 PM
- From: Mark Lanett, mlanett@meer.net
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >Setting the 'Include "weak" ' option in the CW project for the extension
- >libraries seems to have been the key to not having massive stack crashes.
- > When do I want a weak link, and when dont I? Should any of the standard
- >OD or ODF libs be weak linked?
-
- You should only use weak link when you want your part to be able to run
- without the specified library installed. This means that you must do a
- runtime check (to see whether a library is available) before calling into
- them.
-
- In the case of a server part, which can not serve data without the
- extension, you would never weak link against it. However a client may be
- able to function without the server and should weak link against the
- extension, and make sure it's available before calling it (or creating an
- instance of it). For example, many Cyberdog-savvy parts can function
- perfectly well as normal OpenDoc parts if Cyberdog is not installed, so
- they should weak link against Cyberdog. You can determine whether they a
- library is available by comparing the address of an exported function with
- 0. For example:
- Boolean HasCyberdog () {
- return (&GetCyberSession != 0);
- }
- (where GetCyberSession is exported by the Cyberdog library).
-
-
- --
- Mark Lanett <mlanett@meer.net>
- Have a bajillion brilliant Jobsian lithium licks
-
-
-